home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
HENSA
/
MISC
/
SHELL.ARC
/
Shell
/
Sources
/
c
/
PlotIcon
< prev
next >
Wrap
Text File
|
1994-05-17
|
948b
|
33 lines
#include "DeskLib:WimpSWIs.h"
#include "DeskLib:Coord.h"
#include "DeskLib:Wimp.h"
#include "Shell.Extra.h"
#include "Shell.PlotIcon.h"
#define PLOTMAX 16384
os_error *Shell_PlotIcon( icon_block *icon,Shell_convertpoint convert)
/* Plots an icon using Wimp_PlotIcon, but first clips the workarearect */
/* of the icon so that all screen coors are 16 bits. */
/* Restores the old workarearect before returning */
{
wimp_rect backupworkarearect;
os_error *err;
backupworkarearect = icon->workarearect;
Shell_MakeGE( icon->workarearect.min.x, Shell_ConvertXToWorkarea( -PLOTMAX, convert));
Shell_MakeGE( icon->workarearect.min.y, Shell_ConvertYToWorkarea( -PLOTMAX, convert));
Shell_MakeLE( icon->workarearect.max.x, Shell_ConvertXToWorkarea( PLOTMAX, convert));
Shell_MakeLE( icon->workarearect.max.y, Shell_ConvertYToWorkarea( PLOTMAX, convert));
err = Wimp_PlotIcon( icon);
icon->workarearect = backupworkarearect;
return err;
}